package com.zxd.threads.thread_lock.pessimistic_lock;

/**
 * ClassName:Movie
 * Package:com.zxd.threads.thread_optimistic_lock
 *
 * @Date:2023/9/28 14:23
 * @Author:zxde
 */
public class Movie {
    private int count;

    public Movie(int count) {
        this.count = count;
    }

    public void setCount(){
        synchronized (this){
            System.out.println(++this.count);
        }
    }

}
